<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
<form action="?">
    <div class="tt"><?php echo $MOD['name'];?>搜索</div>
    <input type="hidden" name="moduleid" value="<?php echo $moduleid;?>"/>
    <input type="hidden" name="action" value="<?php echo $action;?>"/>
    <table cellpadding="2" cellspacing="1" class="tb">
        <tr>
            <td>
                &nbsp;<?php echo $fields_select;?>&nbsp;
                <input type="text" size="30" name="kw" value="<?php echo $kw;?>" title="关键词"/>&nbsp;
				<?php echo $order_select;?>&nbsp;
                <input type="submit" value="搜 索" class="btn"/>&nbsp;
                <input type="button" value="重 置" class="btn" onclick="window.location='?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=<?php echo $action;?>';"/>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;<select name="datetype">
                <option value="addtime" <?php if ($datetype == 'addtime') echo 'selected';?>>申请日期</option>
            </select>&nbsp;
				<?php echo dcalendar('fromdate', $fromdate, '');?> 至 <?php echo dcalendar('todate', $todate, '');?>&nbsp;
				<?php echo $_admin == 1 ? category_select('catid', '不限分类', $catid, $moduleid) : ajax_category_select('catid', '不限分类', $catid, $moduleid);?>&nbsp;
            </td>
        </tr>
    </table>
</form>
<form method="post">
    <div class="tt"><?php echo $menus[$menuid][0];?></div>
    <table cellpadding="2" cellspacing="1" class="tb">
        <tr>
            <th width="25"><input type="checkbox" onclick="checkall(this.form);"/></th>
            <th width="80">分类</th>
            <th width="120">联系人</th>
            <th width="120">联系电话</th>
            <th width="180">联系邮箱</th>
	        <th width="180">公司名称</th>
            <th width="120">申请会员</th>
            <th width="120">申请时间</th>
            <th width="50">操作</th>
        </tr>
		<?php foreach ($lists as $k => $v) { ?>
        <tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
            <td><input type="checkbox" name="itemid[]" value="<?php echo $v['itemid'];?>"/></td>
            <td><?php echo $v['catname'];?></td>
            <td ><?php echo $v['truename'];?> </td>
	        <td ><?php echo $v['phone'];?> </td>
	        <td ><?php echo $v['email'];?> </td>
	        <td ><?php echo $v['company'];?> </td>
            <td>
				<?php if ($v['username']) { ?>
                <a href="javascript:_user('<?php echo $v["username"];?>');"><?php echo $v['username'];?></a>
				<?php } else { ?>
                <a href="javascript:_ip('<?php echo $v["ip"];?>');" title="游客"><?php echo $v['ip'];?></a>
				<?php } ?>
            </td>
            <td class="px11" title="申请时间<?php echo $v['editdate'];?>"><?php echo $v['adddate'];?></td>
            <td>
	            <a href="javascript:_xdcooper('<?php echo $v["itemid"];?>');">查看</a>
            </td>
        </tr>
		<?php }?>
    </table>
</form>
<div class="pages"><?php echo $pages;?></div>
<br/>
<script type="text/javascript">Menuon(<?php echo $menuid;?>);</script>
<?php include tpl('footer'); ?>